#ifndef HOTKEY_H
#define HOTKEY_H

#include <QWidget>
#include <QLabel>
#include <QList>
#include <QKeyEvent>
#include <QTableView>
#include <QHeaderView>
#include <QStandardItemModel>
#include "../unitls/globalsignalmgr.h"
bool is_key_event_emit(QKeyEvent* event);

struct key_struct{
    QString tip;
    QString key_str;
    QLabel* tip_label;
    QLabel* key_str_label;
    key_struct(){
        tip_label = nullptr;
        key_str_label = nullptr;
    }
};
class HotKey : public QWidget
{
    Q_OBJECT
public:
    explicit HotKey(QWidget *parent = nullptr);

signals:

public slots:
    void InitUI();
private:
    QTableView* tb_view;
    QStandardItemModel* model;
    QList<key_struct*> key_list;
    void set_key_list();
    void setup_ui();
    void resizeEvent(QResizeEvent* e);
};

#endif // HOTKEY_H
